﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TN_CMS.Domain.Entities;

namespace TN_CMS.Domain.Abstract
{
    public interface IStaticContentGroupRepository
    {
        IQueryable<StaticContentGroup> StaticContentGroups { get; }

        /// <summary>
        /// Get StaticContentGroup by page
        /// </summary>
        /// <param name="pageIndex">page index</param>
        /// <param name="pageSize">Page size</param>
        /// <param name="total">Total page</param>
        /// <param name="orderClause">Order clause</param>
        /// <param name="pageSize">Where clause</param>
        /// <returns></returns>
        List<StaticContentGroup> GetList(int pageIndex, int pageSize, out int total, string orderClause, string whereClause);

        /// <summary>
        /// Get StaticContentGroup by StaticContentGroupId
        /// </summary>
        /// <param name="id">StaticContentGroupId</param>
        /// <returns></returns>
        StaticContentGroup GetDetail(int id, bool getInactive = true);

        /// <summary>
        /// Save StaticContentGroup when update or create new StaticContentGroup
        /// </summary>
        /// <param name="StaticContentGroup">StaticContentGroup entity</param>
        /// <param name="actorId">adminId, who save this StaticContentGroup</param>
        /// <returns></returns>
        void Save(StaticContentGroup staticContentGroup, int actorId);

        /// <summary>
        /// Delete StaticContentGroup(s)
        /// </summary>
        /// <param name="ids">StaticContentGroup Id(s)</param>
        /// <returns></returns>
        int Delete(int[] ids);

        /// <summary>
        /// Deactive StaticContentGroup(s)
        /// </summary>
        /// <param name="ids"></param>
        /// <param name="isActive">Active status</param>
        int UpdateActive(int[] ids, bool isActive);
    }
}
